package com.day12.homework;

import java.text.DecimalFormat;
import java.util.Random;

public class ProducerIn implements Runnable {
    private AtmoBase ab;

    public ProducerIn(AtmoBase ab) {
        super();
        this.ab = ab;
    }

    @Override
    public void run() {
        Random r = new Random(100);
        DecimalFormat df = new DecimalFormat("#.00");
        for (int i = 0; i < 100; i++) {
            ab.put(Double.parseDouble(df.format(r.nextDouble() * 100)), Double.parseDouble(df.format(r.nextDouble() * 100)), Double.parseDouble(df.format(r.nextDouble() * 100)));
        }
    }
}
